package cn.yuanqiao.manage.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 租户信息对象 MANAGE_TENANT
 *
 * @author yuanqiao
 * @date 2023-06-07
 */
public class ManageTenant extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long id;

    /** 注册单位 */
    @Excel(name = "注册单位")
    @NotBlank(message = "注册单位不能为空")
    @Size(min = 0,max = 200,message = "注册单位长度不能超过100个汉字")
    private String registeredUnit;

    /** 注册人 */
    @Excel(name = "注册人")
    @NotBlank(message = "注册人不能为空")
    @Size(min = 0,max = 50,message = "注册人长度不能超过25个汉字")
    private String registeredPerson;

    /** 用户名 */
    @Excel(name = "用户名")
    @NotBlank(message = "用户名不能为空")
    @Size(min = 0,max = 50,message = "用户名长度不能超过25个汉字")
    private String userName;

    /** 密码 */
    /*@NotBlank(message = "密码不能为空")
    @Size(min = 0,max = 200,message = "密码长度不能超过200个字符")*/
    private String passWord;

    /** 登录账号 */
    /*@Excel(name = "登录账号")
    @NotBlank(message = "登录账号不能为空")
    @Size(min = 0,max = 100,message = "登录账号长度不能超过100个字符")*/
    private String loginName;

    /** 状态 */
    @Excel(name = "状态(正常,停用)",readConverterExp = "0=正常,1=停用")
    private String state;

    @Size(min = 0,max = 200,message = "描述长度不能超过100个汉字")
    @Excel(name = "描述")
    private String remark;

    //@Excel(name = "租户编码")
    @NotBlank(message = "租户编码不能为空")
    @Size(min = 0,max = 20,message = "租户编码长度不能超过20个字符")
    @Excel(name = "租户编码")
    private String tenantCode;

    private String isManagerDept;

    @Excel(name = "全宗号")
    @NotBlank(message = "全宗号不能为空")
    private String fondsCode;

    private Long fondsCodeId;

    public String getIsManagerDept() {
        return isManagerDept;
    }

    public void setIsManagerDept(String isManagerDept) {
        this.isManagerDept = isManagerDept;
    }

    public String getFondsCode() {
        return fondsCode;
    }

    public void setFondsCode(String fondsCode) {
        this.fondsCode = fondsCode;
    }

    public Long getFondsCodeId() {
        return fondsCodeId;
    }

    public void setFondsCodeId(Long fondsCodeId) {
        this.fondsCodeId = fondsCodeId;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRegisteredUnit() {
        return registeredUnit;
    }

    public void setRegisteredUnit(String registeredUnit) {
        this.registeredUnit = registeredUnit;
    }

    public String getRegisteredPerson() {
        return registeredPerson;
    }

    public void setRegisteredPerson(String registeredPerson) {
        this.registeredPerson = registeredPerson;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ID", getId())
            .append("registeredUnit", getRegisteredUnit())
            .append("registeredPerson", getRegisteredPerson())
            .append("USERNAME", getUserName())
            .append("PASSWORD", getPassWord())
            .append("LOGINNAME", getLoginName())
            .append("REMARK", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("STATE", getState())
            .toString();
    }
}
